Improvements to posting usage data with Metered usage V2
Marketplace managers can post usage data for any active metered usage subscriptions with partner credentials and other parameters using the Metered Usage v2 API endpoint—Billing Usage v2.
Previously, the usage data posted by the API was only processed using credentials created at the time of product creation. For more information, refer to Metered usage V2.
The following examples show requests to send metered usage to a marketplace using a subscription ID and vendor ID.
Request with subscriptionId
{
"idempotencyKey": "{{$guid}}",
"billable": true,
"subscriptionId": "02ab813a-e955-4255-8969-c5329839dd61",
"usages": [
{
"accountId": "1f071a3b-b59e-429d-bb91-c1bbd0ab458d",
"usageList": [
{
"pricingUnit": null,
"customUnit": "USERS",
"quantity": 4,
"unitPrice": 12,
"description": "ABCDEFG ",
"currency": "EUR",
"eventDate": "{{$isoTimestamp}}",
"eventId": null,
"attributes": null
}
]
}
]
}
Request with vendorId
{
"idempotencyKey": "{{$guid}}",
"billable": true,
"vendorId": "202f0f5e-c48a-46e9-bed5-2c1abd4eac33",
"usages": [
{
"accountId": "1f071a3b-b59e-429d-bb91-c1bbd0ab458d",
"usageList": [
{
"pricingUnit": "USER",
"customUnit": null,
"quantity": 10,
"unitPrice": null,
"description": "ABCDEF ",
"currency": "EUR",
"eventDate": "{{$isoTimestamp}}",
"eventId": null,
"attributes": null
}
]
}
]
}
Sample response
{
"requestId": "db0879f1-7a61-4ea3-91ff-4c18047b76fa",
"idempotencyKey": "66c94f03-27ab-428d-8a83-2e8b606f5bbb",
"queryUsageStatus": "/api/integration/v2/billing/usage/requests/db0879f1-7a61-4ea3-91ff-4c18047b76fa"
}
Feature enablement
These enhancements are not enabled by default. Contact your AppDirect technical representative to request it.
Setting enablement
No setting enablement is required.
Documentation
Documentation is updated with the release.
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!